<template>
  <div>
    <navs></navs>
    <headers></headers>
    <div class="xtx-cart-page">
      <div class="container" data-v-a291c938 v-if="arr.length > 0">
        <div class="xtx-bread" data-v-a291c938>
          <div class="xtx-bread-item" data-v-a291c938>
            <a href="#/" class="router-link-active">首页</a>
          </div>
          <i class="iconfont icon-angle-right"></i>
          <div class="xtx-bread-item" data-v-a291c938>
            <span>购物车</span>
          </div>
        </div>
        <div class="cart" data-v-a291c938>
          <table data-v-a291c938>
            <thead data-v-a291c938>
              <tr data-v-a291c938>
                <th width="120" data-v-a291c938>
                  <div class="xtx-checkbox" data-v-c98f0e58 data-v-a291c938>
                    <input
                      type="checkbox"
                      v-model="checkall"
                      @change="checkedAll()"
                    />
                    <span data-v-c98f0e58>全选</span>
                  </div>
                </th>
                <th width="400" data-v-a291c938>商品信息</th>
                <th width="220" data-v-a291c938>单价</th>
                <th width="180" data-v-a291c938>数量</th>
                <th width="180" data-v-a291c938>小计</th>
                <th width="140" data-v-a291c938>操作</th>
              </tr>
            </thead>
            <tbody data-v-a291c938>
              <tr data-v-a291c938 v-for="(i, index) in arr" :key="index">
                <td data-v-a291c938>
                  <div class="xtx-checkbox" data-v-c98f0e58 data-v-a291c938>
                    <input
                      type="checkbox"
                      v-model="i.selected"
                      @change="checkedsmall(i)"
                    />
                  </div>
                </td>
                <td data-v-a291c938>
                  <div class="goods" data-v-a291c938>
                    <a href="#/product/1188005" class data-v-a291c938>
                      <img :src="i.picture" alt data-v-a291c938 />
                    </a>
                    <div data-v-a291c938>
                      <p class="name ellipsis" data-v-a291c938>{{ i.name }}</p>
                      <div class="cart-sku" data-v-4265259f data-v-a291c938>
                        <div class="attrs" data-v-4265259f>
                          <span class="ellipsis" data-v-4265259f>{{
                            i.attrsText
                          }}</span>
                          <i
                            class="iconfont icon-angle-down"
                            data-v-4265259f
                          ></i>
                        </div>
                      </div>
                    </div>
                  </div>
                </td>
                <td class="tc" data-v-a291c938>
                  <p data-v-a291c938>{{ i.price }}</p>
                </td>
                <td class="tc" data-v-a291c938>
                  <div class="xtx-numbox" data-v-3abe1060 data-v-a291c938>
                    <div class="label" data-v-3abe1060></div>
                    <div class="numbox" data-v-3abe1060>
                      <a href="javascript:;" data-v-3abe1060 @click="reduce(i)"
                        >-</a
                      >
                      <input
                        type="text"
                        readonly
                        data-v-3abe1060
                        v-model="i.count"
                      />
                      <a href="javascript:;" data-v-3abe1060 @click="add(i)"
                        >+</a
                      >
                    </div>
                  </div>
                </td>
                <td class="tc" data-v-a291c938>
                  <p class="f16 red" data-v-a291c938>¥208</p>
                </td>
                <td class="tc" data-v-a291c938>
                  <p data-v-a291c938>
                    <a href="javascript:;" data-v-a291c938>移入收藏夹</a>
                  </p>
                  <p data-v-a291c938>
                    <el-button type="text" @click="setdelete(index)"
                      >删除</el-button
                    >
                  </p>
                  <p data-v-a291c938>
                    <a href="javascript:;" data-v-a291c938>找相似</a>
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
          <!-- <el-empty v-if="getSun == 0">
              <el-button type="primary"
                ><router-link to="/">继续逛逛</router-link></el-button
              >
            </el-empty> -->
        </div>
        <div class="action" data-v-a291c938>
          <div class="batch" data-v-a291c938>
            <div class="xtx-checkbox" data-v-c98f0e58 data-v-a291c938>
              <input
                type="checkbox"
                v-model="checkall"
                @change="checkedAll()"
              />
              <span data-v-c98f0e58>全选</span>
            </div>
            <a href="javascript:;" data-v-a291c938 @click="dete()">删除商品</a>
            <a href="javascript:;" data-v-a291c938>移入收藏夹</a>
            <a href="javascript:;" data-v-a291c938>清空失效商品</a>
          </div>
          <div class="total" data-v-a291c938>
            共{{ shujisng }} 件商品，已选择{{ shujisng }} 件,商品合计:
            <span class="red" data-v-a291c938>¥{{ jiage }} </span>
            <button
              class="xtx-button ellipsis middle primary"
              data-v-34af3967
              data-v-a291c938>
              下单结算
            </button>
          </div>
        </div>
      </div>
      <div v-else class="cart-none" data-v-2a071270="" data-v-a291c938="">
        <img
          src=""
          alt=""
          data-v-2a071270=""
        />
        <p data-v-2a071270="">购物车内暂时没有商品</p>
        <div class="btn" data-v-2a071270="">
          <button
            class="xtx-button ellipsis middle primary"
            data-v-34af3967=""
            data-v-2a071270=""
          >
            <router-link to="/">继续逛逛</router-link>
          </button>
        </div>
      </div>
    </div>
  </div>
</template>
  <script>
import navs from "./Navigation.vue";
import headers from "./HomePages.vue";
import axios from "axios";
export default {
  components: {
    navs,
    headers,
  },
  data() {
    return {
      arr: [],
      checkall: false,
      adds: 0,
    };
  },
  mounted() {
    this.cartg();
  },
  methods: {
    setdelete(i) {
      console.log(i);
      console.log(this.arr);
      //   axios({
      //   method: "get",
      //   url: "http://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart",
      //   data: { ids: this.skuId },
      //   headers: { Authorization: "Bearer " + this.$store.state.login.token },
      // }).then(res=>{
      //       console.log(res);

      // })
    },

    //反选
    checkedsmall(i) {
      // console.log(i);
      var bool = true;
      this.arr.forEach((item) => {
        // console.log(item);
        if (item.selected == false) {
          bool = false;
        }
        this.checkall = bool;
        axios({
          method: "put",
          url:
            "https://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart/" +
            item.skuId,
          data: { selected: item.selected },
          headers: { Authorization: "Bearer " + this.$store.state.login.token },
        }).then((res) => {
          // console.log(res);
          if (res.data.msg == "操作成功") {
            this.cartg();
            // console.log(this.adds);
          }
        });
      });
    },
    //全选
    checkedAll() {
      this.arr.forEach((i) => {
        var selected = this.checkall;
        axios({
          method: "put",
          url: "https://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart/selected",
          data: { selected: selected, ids: [i.skuId] },
          headers: { Authorization: "Bearer " + this.$store.state.login.token },
        }).then((res) => {
          // console.log(res);
          if (res.data.msg == "操作成功") {
            this.cartg();
            // console.log(this.adds);
          }
        });
      });
    },
    //加
    add(i) {
      var setcount = i.count;
      setcount++;
      axios({
        method: "put",
        url:
          "http://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart/" +
          i.skuId,
        headers: { Authorization: "Bearer " + this.$store.state.login.token },
        data: { count: setcount },
      }).then((res) => {
        // console.log(res);
        if (res.data.msg == "操作成功") {
          this.cartg();
          // console.log(this.adds);
        }
      });
    },
    //减
    reduce(i) {
      if (i.count >= 1) {
        var getcount = i.count;
        getcount--;
      }
      axios({
        method: "put",
        url:
          "http://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart/" +
          i.skuId,
        headers: { Authorization: "Bearer " + this.$store.state.login.token },
        data: { count: getcount },
      }).then((res) => {
        // console.log(res);
        if (res.data.msg == "操作成功") {
          this.cartg();
        }
      });
    },
    //删除
    setdelete(i) {
      console.log(i);
      console.log(this.arr[i].skuId);
      axios({
        method: "delete",
        url: "http://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart",
        headers: { Authorization: "Bearer " + this.$store.state.login.token },
        data: { ids: [this.arr[i].skuId] },
      }).then((res) => {
        // console.log(res);
        this.cartg();
      });
    },
    //删除所有商品
    dete() {
      var id = [];
      this.arr.forEach((i) => {
        if (i.selected == true) {
          id.push(i.skuId);
        }
      });
      axios({
        method: "delete",
        url: "http://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart",
        headers: { Authorization: "Bearer " + this.$store.state.login.token },
        data: { ids: id },
      }).then((res) => {
        // console.log(res);
        this.cartg();
      });
    },
    cartg() {
      axios({
        method: "get",
        url: "http://pcapi-xiaotuxian-front-devtest.itheima.net/member/cart",
        headers: { Authorization: "Bearer " + this.$store.state.login.token },
      }).then((res) => {
        console.log(res);
        this.arr = res.data.result;
        this.checkall = this.arr.every((i) => {
          return i.selected;
        });
      });
    },
  },
  computed: {
    shujisng() {
      var a = 0;
      this.arr.forEach((i) => {
        if (i.selected == true) {
          a += i.count;
        }
      });
      return a;
    },
    jiage() {
      var s = 0;
      this.arr.forEach((i) => {
        s += i.count * i.nowPrice;
      });
      return s;
    },
  },
};
</script>
  <style  scoped>
.cart-none[data-v-2a071270] {
  text-align: center;
  padding: 250px 0;
  background: #fff;
}
.cart-none img[data-v-2a071270] {
  width: 180px;
}
.cart-none p[data-v-2a071270] {
  color: #999;
  padding: 20px 0;
}
img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}
.primary[data-v-34af3967] {
  border-color: #27ba9b;
  background: #27ba9b;
  color: #fff;
}
.middle[data-v-34af3967] {
  width: 180px;
  height: 50px;
  font-size: 16px;
}
.xtx-button[data-v-34af3967] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  outline: none;
  background: #fff;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.numbox input {
  margin-top: 8px;
}
.batch {
  display: flex;
  justify-content: flex-start;
}
.xtx-cart-page {
  background: #f5f5f5;
}
.down-enter-from[data-v-03413cdf] {
  transform: translate3d(0, -75px, 0);
  opacity: 0;
}
.down-enter-active[data-v-03413cdf] {
  transition: all 0.5s;
}
.down-enter-to[data-v-03413cdf] {
  transform: none;
  opacity: 1;
}
.xtx-message[data-v-03413cdf] {
  width: 300px;
  height: 50px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  margin-left: -150px;
  top: 25px;
  line-height: 50px;
  padding: 0 25px;
  border: 1px solid #e4e4e4;
  background: #f5f5f5;
  color: #999;
  border-radius: 4px;
}
.xtx-message i[data-v-03413cdf] {
  margin-right: 4px;
  vertical-align: middle;
}
.xtx-message .text[data-v-03413cdf] {
  vertical-align: middle;
}
.xtx-button[data-v-34af3967] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  outline: none;
  background: #fff;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.large[data-v-34af3967] {
  width: 240px;
  height: 50px;
  font-size: 16px;
}
.middle[data-v-34af3967] {
  width: 180px;
  height: 50px;
  font-size: 16px;
}
.small[data-v-34af3967] {
  width: 100px;
  height: 32px;
  font-size: 14px;
}
.mini[data-v-34af3967] {
  width: 60px;
  height: 32px;
  font-size: 14px;
}
.default[data-v-34af3967] {
  border-color: #e4e4e4;
  color: #666;
}
.primary[data-v-34af3967] {
  border-color: #27ba9b;
  background: #27ba9b;
  color: #fff;
}
.plain[data-v-34af3967] {
  border-color: #27ba9b;
  color: #27ba9b;
  background: #e6faf6;
}
.gray[data-v-34af3967] {
  border-color: #ccc;
  background: #ccc;
  color: #fff;
}
.xtx-confirm[data-v-9960fb66] {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 8888;
  background: transparent;
}
.xtx-confirm.fade[data-v-9960fb66] {
  transition: all 0.4s;
  background: rgba(0, 0, 0, 0.5);
}
.xtx-confirm .wrapper[data-v-9960fb66] {
  width: 400px;
  background: #fff;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  opacity: 0;
}
.xtx-confirm .wrapper.fade[data-v-9960fb66] {
  transition: all 0.4s;
  transform: translate(-50%, -50%);
  opacity: 1;
}
.xtx-confirm .wrapper .footer[data-v-9960fb66],
.xtx-confirm .wrapper .header[data-v-9960fb66] {
  height: 50px;
  line-height: 50px;
  padding: 0 20px;
}
.xtx-confirm .wrapper .body[data-v-9960fb66] {
  padding: 20px 40px;
  font-size: 16px;
}
.xtx-confirm .wrapper .body .icon-warning[data-v-9960fb66] {
  color: #cf4444;
  margin-right: 3px;
  font-size: 16px;
}
.xtx-confirm .wrapper .footer[data-v-9960fb66] {
  text-align: right;
}
.xtx-confirm .wrapper .footer .xtx-button[data-v-9960fb66] {
  margin-left: 20px;
}
.xtx-confirm .wrapper .header[data-v-9960fb66] {
  position: relative;
}
.xtx-confirm .wrapper .header h3[data-v-9960fb66] {
  font-weight: 400;
  font-size: 18px;
}
.xtx-confirm .wrapper .header a[data-v-9960fb66] {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 20px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  color: #999;
}
.xtx-confirm .wrapper .header a[data-v-9960fb66]:hover {
  color: #666;
}
.xtx-bread {
  display: flex;
  padding: 25px 10px;
}
.xtx-bread-item a {
  color: #666;
  transition: all 0.4s;
}
.xtx-bread-item a:hover {
  color: #27ba9b;
}
.xtx-bread i {
  font-size: 12px;
  margin-left: 5px;
  margin-right: 5px;
  line-height: 22px;
}
.xtx-carousel[data-v-51374c56] {
  width: 100%;
  height: 100%;
  min-width: 300px;
  min-height: 150px;
  position: relative;
}
.xtx-carousel .carousel-body[data-v-51374c56] {
  width: 100%;
  height: 100%;
}
.xtx-carousel .carousel-item[data-v-51374c56] {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.5s linear;
}
.xtx-carousel .carousel-item.fade[data-v-51374c56] {
  opacity: 1;
  z-index: 1;
}
.xtx-carousel .carousel-item img[data-v-51374c56] {
  width: 100%;
  height: 100%;
}
.xtx-carousel .carousel-indicator[data-v-51374c56] {
  position: absolute;
  left: 0;
  bottom: 20px;
  z-index: 2;
  width: 100%;
  text-align: center;
}
.xtx-carousel .carousel-indicator span[data-v-51374c56] {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  cursor: pointer;
}
.xtx-carousel .carousel-indicator span ~ span[data-v-51374c56] {
  margin-left: 12px;
}
.xtx-carousel .carousel-indicator span.active[data-v-51374c56] {
  background: #fff;
}
.xtx-carousel .carousel-btn[data-v-51374c56] {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 228px;
  z-index: 2;
  text-align: center;
  line-height: 44px;
  opacity: 0;
  transition: all 0.5s;
}
.xtx-carousel .carousel-btn.prev[data-v-51374c56] {
  left: 20px;
}
.xtx-carousel .carousel-btn.next[data-v-51374c56] {
  right: 20px;
}
.xtx-carousel:hover .carousel-btn[data-v-51374c56] {
  opacity: 1;
}
.slider[data-v-51374c56] {
  display: flex;
  justify-content: space-around;
  padding: 0 40px;
}
.slider > a[data-v-51374c56] {
  width: 240px;
  text-align: center;
}
.slider > a img[data-v-51374c56] {
  padding: 20px;
  width: 230px !important;
  height: 230px !important;
}
.slider > a .name[data-v-51374c56] {
  font-size: 16px;
  color: #666;
  padding: 0 40px;
}
.slider > a .price[data-v-51374c56] {
  font-size: 16px;
  color: #cf4444;
  margin-top: 15px;
}
.xtx-checkbox[data-v-c98f0e58] {
  display: inline-block;
  margin-right: 2px;
}
.xtx-checkbox .icon-checked[data-v-c98f0e58],
.xtx-checkbox .icon-checked ~ span[data-v-c98f0e58] {
  color: #27ba9b;
}
.xtx-checkbox i[data-v-c98f0e58] {
  position: relative;
  top: 1px;
}
.xtx-checkbox span[data-v-c98f0e58] {
  margin-left: 2px;
}
.xtx-city[data-v-3ebccf2f] {
  display: inline-block;
  position: relative;
  z-index: 400;
}
.xtx-city .select[data-v-3ebccf2f] {
  border: 1px solid #e4e4e4;
  height: 30px;
  padding: 0 5px;
  line-height: 28px;
  cursor: pointer;
}
.xtx-city .select.active[data-v-3ebccf2f] {
  background: #fff;
}
.xtx-city .select .placeholder[data-v-3ebccf2f] {
  color: #999;
}
.xtx-city .select .value[data-v-3ebccf2f] {
  color: #666;
  font-size: 12px;
}
.xtx-city .select i[data-v-3ebccf2f] {
  font-size: 12px;
  margin-left: 5px;
}
.xtx-city .option[data-v-3ebccf2f] {
  width: 542px;
  border: 1px solid #e4e4e4;
  position: absolute;
  left: 0;
  top: 29px;
  background: #fff;
  min-height: 30px;
  line-height: 30px;
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
}
.xtx-city .option > span[data-v-3ebccf2f] {
  width: 130px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  padding: 0 3px;
}
.xtx-city .option > span[data-v-3ebccf2f]:hover {
  background: #f5f5f5;
}
.xtx-city .option .loading[data-v-3ebccf2f] {
  height: 290px;
  width: 100%;
}
.xtx-dialog[data-v-f4f16b98] {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 8887;
  background: transparent;
}
.xtx-dialog.fade[data-v-f4f16b98] {
  transition: all 0.4s;
  background: rgba(0, 0, 0, 0.5);
}
.xtx-dialog .wrapper[data-v-f4f16b98] {
  width: 600px;
  background: #fff;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  opacity: 0;
}
.xtx-dialog .wrapper.fade[data-v-f4f16b98] {
  transition: all 0.4s;
  transform: translate(-50%, -50%);
  opacity: 1;
}
.xtx-dialog .wrapper .body[data-v-f4f16b98] {
  padding: 20px 40px;
  font-size: 16px;
}
.xtx-dialog .wrapper .body .icon-warning[data-v-f4f16b98] {
  color: #cf4444;
  margin-right: 3px;
  font-size: 16px;
}
.xtx-dialog .wrapper .footer[data-v-f4f16b98] {
  text-align: center;
  padding: 10px 0 30px 0;
}
.xtx-dialog .wrapper .header[data-v-f4f16b98] {
  position: relative;
  height: 70px;
  line-height: 70px;
  padding: 0 20px;
  border-bottom: 1px solid #f5f5f5;
}
.xtx-dialog .wrapper .header h3[data-v-f4f16b98] {
  font-weight: 400;
  font-size: 18px;
}
.xtx-dialog .wrapper .header a[data-v-f4f16b98] {
  position: absolute;
  right: 25px;
  top: 25px;
  font-size: 24px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  color: #999;
}
.xtx-dialog .wrapper .header a[data-v-f4f16b98]:hover {
  color: #666;
}
.xtx-infinite-loading .loading[data-v-5ae948ca] {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}
.xtx-infinite-loading .loading .img[data-v-5ae948ca] {
  width: 50px;
  height: 50px;
  /* background: url(../img/load.88daf935.gif) no-repeat 50% / contain; */
}
.xtx-infinite-loading .loading .text[data-v-5ae948ca] {
  color: #999;
  font-size: 16px;
}
.xtx-infinite-loading .none[data-v-5ae948ca] {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}
.xtx-infinite-loading .none .img[data-v-5ae948ca] {
  width: 200px;
  height: 134px;
}
.xtx-infinite-loading .none .text[data-v-5ae948ca] {
  color: #999;
  font-size: 16px;
}
.xtx-more[data-v-234cad38] {
  margin-bottom: 2px;
}
.xtx-more span[data-v-234cad38] {
  font-size: 16px;
  vertical-align: middle;
  margin-right: 4px;
  color: #999;
}
.xtx-more i[data-v-234cad38] {
  font-size: 14px;
  vertical-align: middle;
  position: relative;
  top: 2px;
  color: #ccc;
}
.xtx-more:hover i[data-v-234cad38],
.xtx-more:hover span[data-v-234cad38] {
  color: #27ba9b;
}
.xtx-numbox[data-v-3abe1060] {
  display: flex;
  align-items: center;
}
.xtx-numbox .label[data-v-3abe1060] {
  width: 60px;
  color: #999;
  padding-left: 10px;
}
.xtx-numbox .numbox[data-v-3abe1060] {
  width: 120px;
  height: 30px;
  border: 1px solid #e4e4e4;
  display: flex;
}
.xtx-numbox .numbox > a[data-v-3abe1060] {
  width: 29px;
  line-height: 28px;
  text-align: center;
  background: #f8f8f8;
  font-size: 16px;
  color: #666;
}
.xtx-numbox .numbox > a[data-v-3abe1060]:first-of-type {
  border-right: 1px solid #e4e4e4;
}
.xtx-numbox .numbox > a[data-v-3abe1060]:last-of-type {
  border-left: 1px solid #e4e4e4;
}
.xtx-numbox .numbox > input[data-v-3abe1060] {
  width: 60px;
  padding: 0 5px;
  text-align: center;
  color: #666;
}
input {
  border: 1px solid #000 !important;
  width: 16px;
  height: 16px;
  color: #000;
}
.numbox input {
  border: 0px solid #000 !important;
}
.xtx-pagination[data-v-f17b2f6e] {
  display: flex;
  justify-content: center;
  padding: 30px;
}
.xtx-pagination > a[data-v-f17b2f6e] {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  margin-right: 10px;
}
.xtx-pagination > a[data-v-f17b2f6e]:hover {
  color: #27ba9b;
}
.xtx-pagination > a.active[data-v-f17b2f6e] {
  background: #27ba9b;
  color: #fff;
  border-color: #27ba9b;
}
.xtx-pagination > a.disabled[data-v-f17b2f6e] {
  cursor: not-allowed;
  opacity: 0.4;
}
.xtx-pagination > a.disabled[data-v-f17b2f6e]:hover {
  color: #333;
}
.xtx-pagination > span[data-v-f17b2f6e] {
  margin-right: 10px;
}
.xtx-skeleton[data-v-3673436b] {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: middle;
}
.xtx-skeleton .block[data-v-3673436b] {
  width: 100%;
  height: 100%;
  border-radius: 2px;
}
.shan[data-v-3673436b]:after {
  content: "";
  position: absolute;
  -webkit-animation: shan-3673436b 1.5s ease 0s infinite;
  animation: shan-3673436b 1.5s ease 0s infinite;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    270deg,
    hsla(0, 0%, 100%, 0) 0,
    hsla(0, 0%, 100%, 0.3) 50%,
    hsla(0, 0%, 100%, 0)
  );
  transform: skewX(-45deg);
}
@-webkit-keyframes shan-3673436b {
  0% {
    left: -100%;
  }
  to {
    left: 120%;
  }
}
@keyframes shan-3673436b {
  0% {
    left: -100%;
  }
  to {
    left: 120%;
  }
}
.xtx-steps {
  display: flex;
  text-align: center;
}
.xtx-steps-item {
  flex: 1;
}
.xtx-steps-item:first-child .step:before,
.xtx-steps-item:last-child .step:after {
  display: none;
}
.xtx-steps-item.active .step > span {
  border-color: #27ba9b;
  background: #27ba9b;
  color: #fff;
}
.xtx-steps-item.active .step:after,
.xtx-steps-item.active .step:before {
  background: #27ba9b;
}
.xtx-steps-item.active .title {
  color: #27ba9b;
}
.xtx-steps-item .step {
  position: relative;
}
.xtx-steps-item .step > span {
  width: 48px;
  height: 48px;
  font-size: 28px;
  border: 2px solid #e4e4e4;
  background: #fff;
  border-radius: 50%;
  line-height: 44px;
  color: #ccc;
  display: inline-block;
  position: relative;
  z-index: 1;
}
.xtx-steps-item .step:after,
.xtx-steps-item .step:before {
  content: "";
  position: absolute;
  top: 23px;
  width: 50%;
  height: 2px;
  background: #e4e4e4;
}
.xtx-steps-item .step:before {
  left: 0;
}
.xtx-steps-item .step:after {
  right: 0;
}
.xtx-steps-item .title {
  color: #999;
  padding-top: 12px;
}
.xtx-steps-item .desc {
  font-size: 12px;
  color: #999;
  padding-top: 6px;
}
.xtx-tabs[data-v-c616a5e2] {
  background: #fff;
}
.xtx-tabs > nav[data-v-c616a5e2] {
  height: 60px;
  line-height: 60px;
  display: flex;
  border-bottom: 1px solid #f5f5f5;
}
.xtx-tabs > nav > a[data-v-c616a5e2] {
  width: 110px;
  border-right: 1px solid #f5f5f5;
  text-align: center;
  font-size: 16px;
}
.xtx-tabs > nav > a.active[data-v-c616a5e2] {
  border-top: 2px solid #27ba9b;
  height: 60px;
  background: #fff;
  line-height: 56px;
}
* {
  box-sizing: border-box;
}
html {
  font-size: 14px;
}
body,
html {
  height: 100%;
}
body {
  color: #333;
  min-width: 1240px;
  font: 1em/1.4 Microsoft Yahei, PingFang SC, Avenir, Segoe UI, Hiragino Sans GB,
    STHeiti, "Microsoft Sans Serif", WenQuanYi Micro Hei, sans-serif;
}
dd,
dl,
h1,
h3,
h4,
p,
ul {
  padding: 0;
  margin: 0;
}
a {
  text-decoration: none;
  color: #333;
  outline: none;
}
i {
  font-style: normal;
}

img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}
ul {
  list-style: none;
}
#app {
  background: #f5f5f5;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.container {
  width: 1240px;
  margin: 0 auto;
  position: relative;
}
.ellipsis {
  white-space: nowrap;
}
.ellipsis,
.ellipsis-2 {
  text-overflow: ellipsis;
  overflow: hidden;
}
.ellipsis-2 {
  word-break: break-all;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.fl {
  float: left;
}
.fr {
  float: right;
}
.clearfix:after {
  content: ".";
  display: block;
  visibility: hidden;
  height: 0;
  line-height: 0;
  clear: both;
}
.fade-leave-active {
  position: absolute;
  width: 100%;
  transition: opacity 0.5s 0.2s;
  z-index: 1;
}
.fade-leave-to {
  opacity: 0;
}
.fade-right-enter-from,
.fade-right-leave-to {
  transform: translateX(20px);
  opacity: 0;
}
.fade-right-enter-active,
.fade-right-leave-active {
  transition: all 0.5s;
}
.fade-right-enter-to,
.fade-right-leave-from {
  transform: none;
  opacity: 1;
}
.xtx-form {
  padding: 50px 0;
}
.xtx-form-item {
  display: flex;
  align-items: center;
  width: 700px;
  margin: 0 auto;
  padding-bottom: 25px;
}
.xtx-form-item .label {
  width: 180px;
  padding-right: 10px;
  text-align: right;
  color: #999;
}
.xtx-form-item .label ~ .field {
  margin-left: 0;
}
.xtx-form-item .field {
  width: 320px;
  height: 50px;
  position: relative;
  margin-left: 190px;
}
.xtx-form-item .field .icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 50px;
  text-align: center;
  line-height: 50px;
  color: #999;
}
.xtx-form-item .field .icon ~ .input {
  padding-left: 40px;
}
.xtx-form-item .field .input {
  border: 1px solid #e4e4e4;
  width: 320px;
  height: 50px;
  line-height: 50px;
  padding: 0 10px;
}
.xtx-form-item .field .input.err {
  border-color: #cf4444;
}
.xtx-form-item .field .input:active,
.xtx-form-item .field .input:focus {
  border-color: #27ba9b;
}
.xtx-form-item .error {
  width: 180px;
  padding-left: 10px;
  color: #cf4444;
}
.xtx-form .submit {
  width: 320px;
  border-radius: 4px;
  background: #27ba9b;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 16px;
  color: #fff;
  display: block;
  margin: 0 auto;
}
.xtx-cart-page .cart[data-v-a291c938] {
  background: #fff;
  color: #666;
}
.goods-relevant[data-v-f1713bb2] {
  background: #fff;
  min-height: 460px;
  margin-top: 20px;
}
.goods-relevant .header[data-v-f1713bb2] {
  height: 80px;
  line-height: 80px;
  padding: 0 20px;
}
.goods-relevant .header .title[data-v-f1713bb2] {
  font-size: 20px;
  padding-left: 10px;
}
.goods-relevant .header .icon[data-v-f1713bb2] {
  width: 16px;
  height: 16px;
  display: inline-block;
  border-top: 4px solid #27ba9b;
  border-right: 4px solid #27ba9b;
  box-sizing: border-box;
  position: relative;
  transform: rotate(45deg);
}
.goods-relevant .header .icon[data-v-f1713bb2]:before {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  left: 0;
  top: 2px;
  background: #bcf1e6;
}
[data-v-f1713bb2] .xtx-carousel {
  height: 380px;
}
[data-v-f1713bb2] .xtx-carousel .carousel-indicator {
  bottom: 30px;
}
[data-v-f1713bb2] .xtx-carousel .carousel-indicator span.active {
  background: #27ba9b;
}
[data-v-f1713bb2] .xtx-carousel .carousel-btn {
  top: 110px;
  opacity: 1;
  background: transparent;
  color: #ddd;
}
[data-v-f1713bb2] .xtx-carousel .carousel-btn i {
  font-size: 30px;
}
.cart-none[data-v-2a071270] {
  text-align: center;
  padding: 150px 0;
  background: #fff;
}
.cart-none img[data-v-2a071270] {
  width: 180px;
}
.cart-none p[data-v-2a071270] {
  color: #999;
  padding: 20px 0;
}
.goods-sku[data-v-3d8edf08] {
  padding-left: 10px;
  padding-top: 20px;
}
.goods-sku dl[data-v-3d8edf08] {
  display: flex;
  padding-bottom: 20px;
  align-items: center;
}
.goods-sku dl dt[data-v-3d8edf08] {
  width: 50px;
  color: #999;
}
.goods-sku dl dd[data-v-3d8edf08] {
  flex: 1;
  color: #666;
}
.goods-sku dl dd > img[data-v-3d8edf08] {
  width: 50px;
  height: 50px;
  border: 1px solid #e4e4e4;
  margin-right: 10px;
  cursor: pointer;
}
.goods-sku dl dd > img.selected[data-v-3d8edf08] {
  border-color: #27ba9b;
}
.goods-sku dl dd > img.disabled[data-v-3d8edf08] {
  opacity: 0.6;
  border-style: dashed;
  cursor: not-allowed;
}
.goods-sku dl dd > span[data-v-3d8edf08] {
  display: inline-block;
  height: 30px;
  line-height: 28px;
  padding: 0 20px;
  border: 1px solid #e4e4e4;
  margin-right: 10px;
  cursor: pointer;
}
.goods-sku dl dd > span.selected[data-v-3d8edf08] {
  border-color: #27ba9b;
}
.goods-sku dl dd > span.disabled[data-v-3d8edf08] {
  opacity: 0.6;
  border-style: dashed;
  cursor: not-allowed;
}
.cart-sku[data-v-4265259f] {
  height: 28px;
  border: 1px solid #f5f5f5;
  padding: 0 6px;
  position: relative;
  margin-top: 10px;
  display: inline-block;
}
.cart-sku .attrs[data-v-4265259f] {
  line-height: 24px;
  display: flex;
}
.cart-sku .attrs span[data-v-4265259f] {
  max-width: 230px;
  font-size: 14px;
  color: #999;
}
.cart-sku .attrs i[data-v-4265259f] {
  margin-left: 5px;
  font-size: 14px;
}
.cart-sku .layer[data-v-4265259f] {
  position: absolute;
  left: -1px;
  top: 40px;
  z-index: 10;
  width: 400px;
  border: 1px solid #27ba9b;
  box-shadow: 2px 2px 4px #e6faf6;
  background: #fff;
  border-radius: 4px;
  font-size: 14px;
  padding: 20px;
}
.cart-sku .layer[data-v-4265259f]:before {
  content: "";
  width: 12px;
  height: 12px;
  border-left: 1px solid #27ba9b;
  border-top: 1px solid #27ba9b;
  position: absolute;
  left: 12px;
  top: -8px;
  background: #fff;
  transform: scaleX(0.8) rotate(45deg);
}
.cart-sku .layer .loading[data-v-4265259f] {
  height: 224px;
}
.tc[data-v-a291c938] {
  text-align: center;
}
.tc .xtx-numbox[data-v-a291c938] {
  margin: 0 auto;
  width: 120px;
}
.red[data-v-a291c938] {
  color: #cf4444;
}
.green[data-v-a291c938] {
  color: #27ba9b;
}
.f16[data-v-a291c938] {
  font-size: 16px;
}
.goods[data-v-a291c938] {
  display: flex;
  align-items: center;
}
.goods img[data-v-a291c938] {
  width: 100px;
  height: 100px;
}
.goods > div[data-v-a291c938] {
  width: 280px;
  font-size: 16px;
  padding-left: 10px;
}
.goods > div .attr[data-v-a291c938] {
  font-size: 14px;
  color: #999;
}
.action[data-v-a291c938] {
  display: flex;
  background: #fff;
  margin-top: 20px;
  height: 80px;
  align-items: center;
  font-size: 16px;
  justify-content: space-between;
  padding: 0 30px;
}
.action .xtx-checkbox[data-v-a291c938] {
  color: #999;
}
.action .batch a[data-v-a291c938] {
  margin-left: 20px;
}
.action .red[data-v-a291c938] {
  font-size: 18px;
  margin-right: 20px;
  font-weight: 700;
}
.tit[data-v-a291c938] {
  color: #666;
  font-size: 16px;
  font-weight: 400;
  line-height: 50px;
}
.xtx-cart-page .cart[data-v-a291c938] {
  background: #fff;
  color: #666;
}
.xtx-cart-page .cart table[data-v-a291c938] {
  border-spacing: 0;
  border-collapse: collapse;
  line-height: 24px;
}
.xtx-cart-page .cart table td[data-v-a291c938],
.xtx-cart-page .cart table th[data-v-a291c938] {
  padding: 10px;
  border-bottom: 1px solid #f5f5f5;
}
.xtx-cart-page .cart table td[data-v-a291c938]:first-child,
.xtx-cart-page .cart table th[data-v-a291c938]:first-child {
  text-align: left;
  padding-left: 30px;
  color: #999;
}
.xtx-cart-page .cart table th[data-v-a291c938] {
  font-size: 16px;
  font-weight: 400;
  line-height: 50px;
}
</style>